import MSLogger
from datetime import datetime


def getCesarConnection(cesarConnectionParam):
def sendEvent(event, cesarConnection):
    try:
        packet  = chr(1)                #0
        packet += 'PIN' + chr(2)        #1
        packet += event.eventGenerateTime.strftime(TIME_FORMAT_CESAR) + chr(2)  #2
        packet += 'message' + chr(2)    #3
        packet += 'idZone' + chr(2)     #4
        packet += 'zone' + chr(2)       #5
        packet += 'section' + chr(2)    #6
        packet += event.contactIdFull + chr(2)  #7
        packet += 'surgard' + chr(2)    #8
        packet += 'line' + chr(2)       #9
        packet += 'receiver' + chr(2)   #10
        packet += 'messageid' + chr(2)  #11
        packet += 'personId' + chr(2)   #12
        packet += 'messageGroup' + chr(2) #13
        packet += 'x' + chr(2)          #14
        packet += 'comn' + chr(2)       #15
    except (Exception), err:
        MSLogger.logError()
    s.send(packet)

def sendEvents(events, cesarConnection, cesarConnectionParam):
    if events == None or len(events) == 0:
        return cesarConnection


    
